<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
 
	<!--数据库连接 -->
	<bean id="dataSource"
		class="org.apache.commons.dbcp.BasicDataSource"
		destroy-method="close">
		<property name="driverClassName" value="com.mysql.jdbc.Driver" />
		<property name="url" value="jdbc:mysql://localhost:3306/eas?characterEncoding=gbk" />
		<property name="username" value="eas" />
		<property name="password" value="eas" />
		<property name="maxActive" value="10" />
		<property name="maxIdle" value="3" />
		<property name="maxWait" value="1000" />
		<property name="defaultAutoCommit" value="true" />
		<property name="removeAbandonedTimeout" value="60" />
	</bean>
    <!-- 大数据处理 -->
	<bean id="lobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler" />
	<!-- iBatis相关 -->
	<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"
		abstract="false" scope="prototype" lazy-init="default"
		autowire="default" dependency-check="default">
		<property name="configLocation">
			<value>classpath:sqlMap-config.xml</value>
		</property> 
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
		<property name="lobHandler" ref="lobHandler" />
	</bean>
	
	<!-- 事务 -->
	<bean id="transactionManager"
		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
	</bean>
	<bean id="baseTransactionProxy"
		class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
		abstract="true">
		<property name="transactionManager" ref="transactionManager" />
		<property name="transactionAttributes">
			<props>
				<prop key="insert*">PROPAGATION_REQUIRED</prop>
				<prop key="update*">PROPAGATION_REQUIRED</prop>
				<prop key="delete*">PROPAGATION_REQUIRED</prop>
				<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
				<prop key="select*">PROPAGATION_REQUIRED,readOnly</prop>
				<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
			</props>
		</property>
	</bean>

	<!-- 信息提示  -->
    <bean id="messageSource"  class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basenames">
            <list>
                <value>com.qzgf.application.BaseAction</value>
            </list>
        </property>
    </bean>
  
    
    <!-- spring上下文关连设置,可直接取得信息 -->
    <bean id="ContextHelper" class="com.qzgf.core.common.ContextHelper"></bean>
</beans>
